<!--{template /module/admin/view/head}-->
<div id="left_layout">
	<div id="main_content" class="container-fluid">
		<!--{template /module/admin/view/head_nav}-->
		<div class="row-fluid">
			<form method="post" action="{$ADMIN_SCRIPT}/user/card" onsubmit="javascript:return check_form(this);">
			<input type="hidden" name="formsubmit" value="yes" />
				<div class="well widget">
					<div class="widget-header">
						<p class="text">* {lang admin.validate.require}</p>
					</div>
					<div class="widget-content">
						<fieldset>
							<label>{lang user.card.view.username.label} *</label>
							<input type="text" class="input-lxarge" name="txtUserName" placeholder="{lang user.card.view.username.placeholder}" maxlength="30"/> 
							<span class="help-inline">{lang user.card.view.username.tips}</span>
							
							<label>{lang user.card.view.password.label} *</label>
							<input type="text" name="txtCardPassword" class="input-xlarge" placeholder="{lang user.card.view.password.placeholder}" maxlength="16"/> 
							<span class="help-inline">{lang user.card.view.password.tips}</span>
							
							<hr />
							<button type="submit"  name="btnSubmit" class="btn btn-small btn-primary" {$dispatches[operations][add]}>{lang admin.operation.submit}</button>
							<button type="reset" class="btn btn-small">{lang admin.operation.reset}</button>
						</fieldset>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>

<script>
    function check_form(frm){
        if(frm.txtUserName.value.trim().length == 0){
        	$(frm.txtUserName).next('.help-inline').css('color', 'red');
        	frm.txtUserName.focus();
        	return false;
        }
        
        if(frm.txtCardPassword.value.trim().length == 0){
        	$(frm.txtCardPassword).next('.help-inline').css('color', 'red');
        	frm.txtCardPassword.focus();
        	return false;
        }
		
        return true;
     }
    
    $(function() {
		$('.fancy').uniform();

		$('fieldset input,textarea,select').blur(function() {
			$(this).next('.help-inline').css('color', '#333');
		});
	});
</script>
<!--{template /module/admin/view/foot}-->